package defpackage; import defpackage.npd; import defpackage.nxv; import java.util.ArrayList; import java.util.HashMap; import java.util.Stack; import org.xml.sax.Attributes; /* renamed from: nxw reason: default package */ public final class nxw implements aaov { private mdl oGv; private npd pFq; private aaou pFr; private kfz pFs; private ArrayList<ejz> pFt; private HashMap<String, npd.a> pPW; private HashMap<ejz, String> pPX; private aago qix; private Stack<nxh> qkA = new Stack<>(); private nxp qky; private nwz qkz; public nxw(aaou aaou, npd npd, mdl mdl) { ew.assertNotNull("shapes2Core should not be null", npd); ew.assertNotNull("document should not be null", mdl); this.oGv = mdl; this.pFq = npd; this.pFr = aaou; this.pFt = new ArrayList<>(); this.pPW = new HashMap<>(); this.pPX = new HashMap<>(); } @Override // defpackage.aaov public final void UC(int i) { ew.assertNotNull("mCurImporter should not be null", this.qky); this.qky.edr(); if (98629247 == i) { this.qkA.pop(); } this.qky = this.qkA.isEmpty() ? null : this.qkA.peek(); } @Override // defpackage.aaov public final void X(int i, Attributes attributes) { ejk eds; if (this.qkA.isEmpty()) { eds = null; } else { nxh peek = this.qkA.peek(); ew.assertNotNull("groupImporter should not be null", peek); eds = peek.eds(); } switch (i) { case -1638324645: this.qky = new nxr(this.qix, this.oGv); break; case -4156302: this.qky = new nxm(this.qix, this.oGv, eds); break; case 3321844: this.qky = new nxi(this.qix, this.oGv, eds); break; case 3423314: case 3496420: case 100313435: this.qky = new nxj(this.qix, this.oGv, eds); break; case 98629247: this.qky = new nxh(this.qix, this.oGv, eds); this.qkA.add((nxh) this.qky); break; case 109399969: this.qky = new nxq(this.qix, this.oGv, eds); break; default: ew.eI(); break; } if (this.qky != null) { ejz V = this.qky.V(i, attributes); String bS = nza.bS(attributes); if (bS != null) { this.pPX.put(V, bS); } if (-1638324645 != i && eds == null) { this.pFt.add(V); } } } @Override // defpackage.aaov public final void a(aago aago, int i, Attributes attributes) { if (this.qkz == null) { ejo bbf = this.oGv.bbf(); if (bbf.aZx()) { this.qkz = new nwz(bbf.aZw(), bbf); } } if (this.qkz != null) { nwz nwz = this.qkz; ew.assertNotNull("part should not be null!", aago); ew.assertNotNull("backgroundAttr should not be null!", attributes); nwz.qix = aago; nwz.qiy = aayw.c(attributes, "color"); } } @Override // defpackage.aaov public final void a(aago aago, kfz kfz) { this.qix = aago; this.pFs = kfz; } @Override // defpackage.aaov public final void ab(int i, String str) { if (this.oGv.getLength() > 0) { ew.assertNotNull("mBackgroundImporter should not be null", this.qkz); } if (this.qkz != null) { nwz nwz = this.qkz; switch (i) { case -1332194002: if (str.equals("urn:schemas-microsoft-com:vml")) { nxc nxc = nwz.qiz; new nyv(nxc.qiK, nxc.qiJ, nxc.eWH).ecQ(); return; } else if (nwz.qiz == null && nwz.qiy != null) { nwz.eWH.a(new evs(npb.LP(nwz.qiy))); nwz.eWH.a((eux) null); nwz.eWH.a((euv) null); return; } else { return; } case 3143043: return; default: ew.eI(); return; } } } @Override // defpackage.aaov public final void b(int i, String str, Attributes attributes) { ew.assertNotNull("mCurImporter should not be null", this.qky); this.qky.a(i, str, attributes); } @Override // defpackage.aaov public final void bO(Attributes attributes) { ew.assertNotNull("mCurImporter should not be null", this.qky); ((nxq) this.qky).bM(attributes); } @Override // defpackage.aaov public final void bP(Attributes attributes) { String a; String a2; String a3; String a4; abfy e; if (attributes != null && (a = aayw.a(attributes, "Type", "")) != null && (a2 = aayw.a(attributes, "ProgID", "")) != null && a2.equals("Package") && (a3 = aayw.a(attributes, "ShapeID", "")) != null && (a4 = aayw.a(attributes, "id", "http://schemas.openxmlformats.org/officeDocument/2006/relationships")) != null && (e = nyu.e(a4, this.qix)) != null) { int a5 = npb.a(e, this.oGv.dDV().dIf()); npd.a aVar = new npd.a(); aVar.ckp = a; aVar.pRX = a2; aVar.pRY = a5; this.pPW.put(a3, aVar); } } @Override // defpackage.aaov public final void c(int i, String str, Attributes attributes) { if (this.oGv.getLength() > 0) { ew.assertNotNull("mBackgroundImporter should not be null", this.qkz); } if (this.qkz != null) { nwz nwz = this.qkz; switch (i) { case -1332194002: if (str.equals("urn:schemas-microsoft-com:vml")) { nwz.qiz = new nxc(nwz.qix, nwz.eWw, nwz.eWH); nxc nxc = nwz.qiz; ew.assertNotNull("mVmlContext should not be null", nxc.qiJ); if (attributes != null) { nxc.qiJ.qme = aayw.a(attributes, "fillcolor", ""); return; } return; } return; case 3143043: if (str.equals("urn:schemas-microsoft-com:vml")) { nyx.a(attributes, nwz.qiz.qiK); return; } else if (str.equals("urn:schemas-microsoft-com:office:office")) { nyx.b(attributes, nwz.qiz.qiK); return; } else { return; } default: ew.eI(); return; } } } @Override // defpackage.aaov public final aaou dUS() { return this.pFr; } @Override // defpackage.aaov public final void edz() { if (this.pPW.size() > 0) { this.pFq.j(this.pPX); this.pFq.k(this.pPW); } this.pFq.a(this.pFt, this.pFs); this.pFt.clear(); } @Override // defpackage.aaov public final void zE(boolean z) { int i; int i2; int i3 = 3; int i4 = 5; ew.assertNotNull("mCurImporter should not be null", this.qky); nxp nxp = this.qky; if (z && nxp.qjX != null) { nxv nxv = nxp.qjX; hj fi = nxv.qks == null ? null : nxv.qks.fi(); if (fi != null) { exx exx = nxv.qkr; ew.assertNotNull("wrapStyle should not be null!", fi); switch (nxv.AnonymousClass1.qkv[fi.ordinal()]) { case 1: i2 = 0; break; case 2: i2 = 2; break; default: i2 = 0; ew.eI(); break; } exx.uj(i2); } hf fJ = nxv.qks == null ? null : nxv.qks.fJ(); if (fJ != null) { exx exx2 = nxv.qkr; ew.assertNotNull("textAnchor should not be null!", fJ); switch (nxv.AnonymousClass1.qkw[fJ.ordinal()]) { case 1: i = 0; break; case 2: i = 1; break; case 3: i = 2; break; case 4: i = 3; break; case 5: i = 4; break; case 6: i = 5; break; case 7: i = 6; break; case 8: i = 7; break; case 9: i = 8; break; case 10: i = 9; break; default: i = 0; ew.eI(); break; } exx2.uk(i); } if (nxv.qku != null) { nyo nyo = new nyo(nxv.qku); exx exx3 = nxv.qkr; if (!(nyo.qnc == null || nyo.qnc.Dd == null)) { exx3.cr(nyo.b(nyo.qnc)); } if (!(nyo.qnd == null || nyo.qnd.Dd == null)) { exx3.ct(nyo.b(nyo.qnd)); } if (!(nyo.qne == null || nyo.qne.Dd == null)) { exx3.cs(nyo.b(nyo.qne)); } if (!(nyo.qnf == null || nyo.qnf.Dd == null)) { exx3.cu(nyo.b(nyo.qnf)); } } if (nxv.cIg != null) { aaop aaop = new aaop(nxv.cIg); Boolean fH = aaop.fH(); if (fH != null) { nxv.qkr.jW(fH.booleanValue()); } Boolean fI = aaop.fI(); if (fI != null) { nxv.qkr.jX(fI.booleanValue()); } gd fL = aaop.fL(); if (fL != null) { exx exx4 = nxv.qkr; switch (nxv.AnonymousClass1.qkx[fL.ordinal()]) { case 1: break; case 2: i4 = 2; break; default: ew.eI(); break; } exx4.ul(i4); } else { fy fK = aaop.fK(); if (fK != null) { exx exx5 = nxv.qkr; switch (nxv.AnonymousClass1.pVg[fK.ordinal()]) { case 1: case 2: i3 = 0; break; case 3: case 4: break; case 5: i3 = 4; break; case 6: i3 = 1; break; default: i3 = 0; ew.eI(); break; } exx5.ul(i3); } } String fO = aaop.fO(); if (nyu.Lq(fO)) { nxv.qkr.um(nmg.a(fO, nxv.qkt.bbf()).intValue()); } } nxv.qkr.un(0); nxv.qkr.jZ(true); nxv.qkr.jY(false); } } }